<template>
  <div>
    <div class="table-head">
      <div>
        <span>上报单位</span>
        <input
          class="policeSearchClass"
          type="text"
          name="policeSearch"
          placeholder="请输入..."
        />
      </div>
      <div>
        <span>值班日期</span>
        <input
          class="dataSearchClass"
          type="text"
          name="dataSearch"
          placeholder="请输入..."
        />
      </div>
      <div>
        <button>搜索</button>
      </div>
    </div>
    <table class="foot-table">
      <tbody>
        <tr style="font-size: 16px; color: #666566">
          <td>编号</td>
          <td>上报单位</td>
          <td>值班日期</td>
          <td>上报时间</td>
          <td>道路</td>
          <td>路况</td>
          <td>操作</td>
        </tr>
        <tr v-for="(item, index) in traffic" :key="index">
          <td>{{ index+1 }}</td>
          <td>{{ item.police }}</td>
          <td>{{ item.date }}</td>
          <td>{{ item.date }} &nbsp;&nbsp;&nbsp;{{ item.time }}</td>
          <td>{{ item.load }}</td>
          <td style="color: #ffb76d">{{ item.condition }}</td>
          <td>
            <i
              style="font-size: 14px; color: #3a81fb; margin-right: 7px"
              class="iconfont icon-eye"
            ></i>
            <span style="cursor: pointer">查看</span>
            <i
              style="
                font-size: 14px;
                color: #e3604f;
                margin-right: 7px;
                margin-left: 20px;
              "
              class="iconfont icon-shanchu"
            ></i>
            <span style="cursor: pointer">删除</span>
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      traffic: [
        {
          police: "交警一大队",
          date: "2021.09.01",
          time: "12:00",
          load: "宜山路",
          condition: "拥堵",
        },
        {
          police: "交警一大队",
          date: "2021.09.01",
          time: "12:00",
          load: "宜山路",
          condition: "拥堵",
        },
        {
          police: "交警一大队",
          date: "2021.09.01",
          time: "12:00",
          load: "宜山路",
          condition: "拥堵",
        },
      ],
    };
  },
};
</script>
<style lang="less" >
.table-head {
  margin: 0 0 8px;
  width: 100%;
  min-width: 1050px;
  background-color: #fff;
  height: 60px;
  box-shadow: 0px 2px 0px 1px #c3c1d1;
  border-radius: 5px;
  color: #333;
  display: flex;
  align-items: center;
  text-align: center;
  span {
    font-size: 18px;
    font-weight: bold;
    line-height: 32px;
  }
  button {
    width: 100px;
    height: 26px;
    color: #fff;
    background-color: #6768ff;
    font-size: 14px;
    border-radius: 5px;
    border: none;
    box-shadow: 0px 1px 0px 2px #c4c3d3;
  }
  div:nth-child(1),
  div:nth-child(2) {
    width: 36%;
  }
  div:nth-child(3) {
    width: 28%;
  }
  .policeSearchClass,
  .dataSearchClass {
    width: 124px;
    height: 26px;
    outline: none;
    border: 1px solid #e9e8ee;
    padding: 0 8px;
    line-height: 26px;
    font-size: 12px;
    color: #a6a5a6;
    margin-left: 26px;
    border-radius: 5px;
    box-shadow: 0px 2px 0px 2px #e9e8ee;
    vertical-align: top;
  }
}
.foot-table {
  min-width: 1050px;
  width: 100%;
  tbody {
    width: 100%;
    tr {
      width: 100%;
      height: 40px;
      margin-bottom: 5px;
      display: block;
      line-height: 40px;
      background-color: #fff;
      border-radius: 4px;
      font-size: 14px;
      color: #333;
      box-shadow: 0px 2px 0px 1px #c3c1d1;
      display: flex;
      justify-content: center;
      text-align: center;
      td:nth-child(7) {
        width: 19.5%;
      }
      td:nth-child(1){
        width: 9.5%;
      }
      td:nth-child(3),
      td:nth-child(6),
      td:nth-child(5) {
        width: 10.5%;
      }
      td:nth-child(2){
        width: 18%;
      }
      td:nth-child(4) {
        width: 19%;
      }
    }
  }
}
</style>
